#!/usr/bin/env python3
# -*- coding:UTF-8 -*-
##########################################################################
# File Name: a.py
# Author: cx
# Created Time: Sun Mar 19 22:50:01 2023
##########################################################################
import requests
import re
from lxml import etree
headers={'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36','referer':"www.mmjpg.com" }


for i in  range(1,5):
  url = f'https://oj.njxzc.com.cn/p?page={i}'
  url = 'https://www.baidu.com/'
  print(url)
  page = requests.get("http://www.baidu.com",headers=headers,timeout=3)
  print(page)
  selector = etree.HTML(page.content)
  for j in range(1,100):
    data = selector.xpath(f'//*[@id="panel"]/div[3]/div/div[1]/div/div[2]/div/div/table[2]/tbody/tr[{j}]/td[3]/a')
    print(data)
    
